{% if user.is_staff and user.has_perm('announcements.add_announcement') %}
  <a class="add" href="{{ url('admin:announcements_announcement_add') }}">{{ _('Add announcement') }}</a>
{% endif %}
{% if announcements %}
  <ul id="doc-content" class="announcements">
    {% for a in announcements %}
      <li>
        {% if user.is_staff and user.has_perm('announcements.change_announcement') %}
          <a class="edit" href="{{ url('admin:announcements_announcement_change', a.id) }}">{{ _('Edit') }}</a>
        {% endif %}
        {{ a.content|wiki_to_html }}
        {{ datetimeformat(a.show_after, format='datetime') }}
      </li>
    {% endfor %}
  </ul>
{% endif %}
